package com.jy.admin.db.dao.impl;
import com.fqgj.common.base.AbstractBaseMapper;
import com.jy.admin.db.dao.CeMerchantDao;
import com.jy.admin.db.entity.CeMerchantEntity;
import org.springframework.stereotype.Repository;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
* User: anonymous
* Date: 2022-01-03
* Time: 18:14:20.154
*/

@Repository
public class CeMerchantDaoImpl extends AbstractBaseMapper<CeMerchantEntity> implements CeMerchantDao {

    @Override
    public CeMerchantEntity queryMerchantByCode(String code) {
        Map<String, Object> params = new HashMap<>();
        params.put("code",code);
        return getSqlSession().selectOne(this.getStatement("queryMerchantByCode"), params);
    }

    @Override
    public List<CeMerchantEntity> getAllActiveMerchant() {
        Map<String, Object> params = new HashMap<>();
        return getSqlSession().selectList(this.getStatement("getAllActiveMerchant"), params);
    }
}